Virtual memory systems provide a consistent memory addressing scheme for computer programs and are a common part of most operating systems on computers. They have become common because it provides a benefit for users at a very low cost. Most computers today have an insufficient amount of physical memory to simultaneously load all of the programs that most users expect to run at once. For example, if a user loads the operating system, an e-mail program, a Web browser and word processor into memory simultaneously, the computer memory may not be enough to hold it all. If there were no such thing as virtual memory, then once you filled up the available memory your computer would have to say, “Sorry, you cannot load any more applications. Please close another application to load a new one.” Virtual memory systems keep track of physical memory locations that have not been used recently and copy them onto the hard disk without changing the logical, or “virtual,” address of the data that was stored at that physical location. This frees up space in memory to load the new application. Moreover, this copying and address translation is performed automatically by the operating system; the user typically doesn't even know it is happening. Because hard disk space is so much cheaper than main memory, the use of virtual memory also has an economic benefit.
To facilitate copying virtual memory into physical memory, the operating system divides virtual memory into pages, each of which contains a fixed number of memory addresses. Each page is stored on a disk until it is needed. When the page is needed, the operating system copies it from disk to main memory, translating the virtual addresses into physical addresses. The copying of virtual pages from disk to main memory is known as paging or swapping.